<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/css/style.css">
<title>本科管理系统</title>
</head>
<body>
    <div class="page-header">
  		<h1>
  			<img alt="logo" src="<%=request.getContextPath()%>/images/logo.png">金华职业技术学院<small>本科管理系统</small>
  		</h1>
	</div>
	<div class="link">
    	<nav class="navbar navbar-default" role="navigation">  
     		<div class="navbar-header">
					<a class="navbar-brand" href="<%=request.getContextPath()%>/user/index.jsp">首页</a>       				
     		</div> 
     		<div class="collapse navbar-collapse" id="myCollapse">  
       			<ul class="nav navbar-nav">  
         			<li class="dropdown">  
           				<a href="#" class="dropdown-toggle" data-toggle="dropdown">学生学籍<b class="caret"></b></a>  
           				<ul class="dropdown-menu">  
           				<c:set var="index" value="index"></c:set>
           				<c:set var="student" value="student"></c:set>
           				<c:set var="teacher" value="teacher"></c:set>
           					<c:if test="${role==1}">
           						
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="student/information.do">个人信息</a></li>	
           						</c:if>
           						
             					<c:if test="${fn:contains(pageContext.request.requestURL,student)}">
           						<li><a href="information.do">个人信息</a></li>	
           						</c:if>
             				</c:if>
             				<c:if test="${role==2}">
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="teacher/tinformation.do?page=1">个人信息</a></li>	
           						</c:if>			
             					<c:if test="${fn:contains(pageContext.request.requestURL,teacher)}">
           						<li><a href="tinformation.do?page=1">个人信息</a></li>	
           						</c:if>
           						<li><a href="<%=request.getContextPath()%>/user/teacher/addinfo.jsp">添加学生信息</a></li>
           						
           					</c:if> 				 
           				</ul>  
         				</li>
					<li class="dropdown">  
           					<a href="#" class="dropdown-toggle" data-toggle="dropdown"> 学生成绩<b class="caret"></b></a>  
           					<ul class="dropdown-menu">  
           						<c:if test="${role==1}">
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="student/score.do">查看成绩</a></li>	
           						</c:if>
             					<c:if test="${fn:contains(pageContext.request.requestURL,student)}">
           						<li><a href="score.do">查看成绩</a></li>	
           						</c:if>
             					</c:if> 
             					<c:if test="${role==2}">
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="teacher/tscore.do">查看成绩</a></li>	
           						</c:if>
             					<c:if test="${fn:contains(pageContext.request.requestURL,teacher)}">
           						<li><a href="tscore.do">查看成绩</a></li>	
           						</c:if>
           							<li><a href="<%=request.getContextPath()%>/user/teacher/addscore.jsp">添加成绩信息</a></li>
           							
           						</c:if> 
           					</ul>  
         				</li>  
					<li class="dropdown">  
           					<a href="#" class="dropdown-toggle" data-toggle="dropdown">缴费信息<b class="caret"></b></a>  
           					<ul class="dropdown-menu"> 
           						<c:if test="${role==1}"> 
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="student/payment.do">缴费情况</a></li>	
           						</c:if>
             					<c:if test="${fn:contains(pageContext.request.requestURL,student)}">
           						<li><a href="payment.do">缴费情况</a></li>	
           						</c:if>
             					</c:if> 
             					<c:if test="${role==2}">
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="teacher/tpayment.do">缴费情况</a></li>	
           						</c:if>
             					<c:if test="${fn:contains(pageContext.request.requestURL,teacher)}">
           						<li><a href="tpayment.do">缴费情况</a></li>	
           						</c:if> 
           							<li><a href="<%=request.getContextPath()%>/user/teacher/addpayment.jsp">添加缴费信息</a></li>
           							
           						</c:if>	 
           					</ul>  
         				</li>  
         			<li class="dropdown">  
         			<c:if test="${role==2}">
           					<a href="#" class="dropdown-toggle" data-toggle="dropdown">其他添加<b class="caret"></b></a>  
           					<ul class="dropdown-menu"> 
             					<c:if test="${role==2}">
           						 <li><a href="<%=request.getContextPath()%>/user/teacher/addclass.jsp">导入班级信息</a></li>
           							<li><a href="<%=request.getContextPath()%>/user/teacher/addcourse.jsp">导入课程信息</a></li>
           							
           						</c:if>	 
           					</ul> 
           					</c:if>	 
         				</li> 
       				</ul>  
       				<ul class="nav navbar-nav navbar-right">  
       					<li><a>${username}</a></li>   
           						<c:if test="${fn:contains(pageContext.request.requestURL,index)}">
           						<li><a href="logout.do">注销</a></li>	
           						</c:if>
             					<c:if test="${fn:contains(pageContext.request.requestURL,index)==false}">
           						<li><a href="../logout.do">注销</a></li>	
           						</c:if>
         				<!--  <li class="dropdown">
           					<a href="#" class="dropdown-toggle" data-toggle="dropdown">
           						<c:if test="${role==1}">学生</c:if>
           						<c:if test="${role==2}">老师</c:if>
           					<b class="caret"></b></a>
           					<ul class="dropdown-menu">
           						<li><a href="#">${username}</a></li>
								<li><a href="logout.do">注销</a></li> 
           					</ul> 
         				</li> -->  
       				</ul>  
     			</div>  
    		</nav>
    	</div> 	
</body>
</html>